package com.spring.demo.core.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import com.spring.demo.core.dao.IMemberDao;
import com.spring.demo.core.entity.Member;
import com.spring.demo.core.service.IMemberService;

/**
 * hibernate
 * 
 * @author sean
 * 
 */
@Transactional
public class MemberHibernateService implements IMemberService {

	@Autowired
	private IMemberDao memberDao;

	@Override
	public void saveMember(Member member) {
		memberDao.saveMember(member);
	}

	@Override
	public Member getMemberById(Long id) {
		return memberDao.getMemberById(id);
	}

	@Override
	public List<Member> getAllMembers() {
		return memberDao.getAllMembers();
	}

}
